cargo.git
10 years agoAuto merge of #1780 - seth:sf/nested-projects-fix, r=alexcrichton
bors [Tue, 7 Jul 2015 16:20:43 +0000 (16:20 +0000)]
Auto merge of #1780 - seth:sf/nested-projects-fix, r=alexcrichton

This is a fix for #1779

10 years agoUse info! instead of warn! for skipping message
Seth Falcon [Tue, 7 Jul 2015 01:40:36 +0000 (18:40 -0700)]
Use info! instead of warn! for skipping message

10 years agoAuto merge of #1776 - alexcrichton:no-entry-found-for-key-again, r=brson
bors [Tue, 7 Jul 2015 01:36:44 +0000 (01:36 +0000)]
Auto merge of #1776 - alexcrichton:no-entry-found-for-key-again, r=brson

Previously a Target was not considered to be in the key of the map to build
script dependencies, but this meant that information like whether it was a
dev-dependency was lost. As a result libraries would depend on the build scripts
of their dev-dependencies, causing an internal error when the build script
hadn't finished yet when the library was being built.

Closes #1751

10 years agoAuto merge of #1786 - eminence:docs, r=alexcrichton
bors [Tue, 7 Jul 2015 00:04:27 +0000 (00:04 +0000)]
Auto merge of #1786 - eminence:docs, r=alexcrichton

See also https://github.com/rust-lang/cargo/issues/1614

10 years agoUpdated guide.md with local config clarification
Andrew Chin [Mon, 6 Jul 2015 18:58:13 +0000 (14:58 -0400)]
Updated guide.md with local config clarification

See also https://github.com/rust-lang/cargo/issues/1614

10 years agoAuto merge of #1782 - Dineshs91:uninstall, r=alexcrichton
bors [Mon, 6 Jul 2015 17:07:59 +0000 (17:07 +0000)]
Auto merge of #1782 - Dineshs91:uninstall, r=alexcrichton

Fixes #1068.

10 years agoAdd test for ignoring nested self packages
Seth Falcon [Sun, 5 Jul 2015 18:34:43 +0000 (11:34 -0700)]
Add test for ignoring nested self packages

10 years agoRemove readme note for libgit2
Seth Falcon [Sun, 5 Jul 2015 18:33:57 +0000 (11:33 -0700)]
Remove readme note for libgit2

Indeed this seems to be handled by the build automatically.

10 years agoAdd make uninstall to .travis.yml
dinesh [Sun, 5 Jul 2015 17:34:37 +0000 (23:04 +0530)]
Add make uninstall to .travis.yml

10 years agoAuto merge of #1785 - kennytm:patch-1, r=alexcrichton
bors [Sun, 5 Jul 2015 18:01:28 +0000 (18:01 +0000)]
Auto merge of #1785 - kennytm:patch-1, r=alexcrichton

10 years agoFix minor typo in `cargo rustc --help`.
kennytm [Sun, 5 Jul 2015 17:57:05 +0000 (01:57 +0800)]
Fix minor typo in `cargo rustc --help`.

10 years agoPass prefix and destdir
dinesh [Sun, 5 Jul 2015 17:31:23 +0000 (23:01 +0530)]
Pass prefix and destdir

10 years agoAuto merge of #1783 - c4rlo:run-typos, r=alexcrichton
bors [Sun, 5 Jul 2015 16:53:33 +0000 (16:53 +0000)]
Auto merge of #1783 - c4rlo:run-typos, r=alexcrichton

10 years agocargo run: fix typos in help text
c4rlo [Sun, 5 Jul 2015 10:23:36 +0000 (11:23 +0100)]
cargo run: fix typos in help text

10 years agoAdd uninstall target
dinesh [Sat, 4 Jul 2015 08:17:28 +0000 (13:47 +0530)]
Add uninstall target

10 years agoDisallow nesting of packages with same packge_id
Seth Falcon [Fri, 3 Jul 2015 22:36:25 +0000 (15:36 -0700)]
Disallow nesting of packages with same packge_id

If a package contains a subdirectory that contains a copy of
itself (strange, but encountered in the wild in the context of an OS
package build tool), cargo was failing with a non-descriptive "An
unknown error occurred" (or "no package found in source" with
--verbose).

Since nested packages use the root path, such a package will have an
identical package_id to the root package. With this patch, we keep the
first occurance of a given package_id rather than overwritting --
effectively ignoring the nested package with duplicated name. A warn!
message is printed.

10 years agoAdd libgit2 to list of build deps in README
Seth Falcon [Fri, 3 Jul 2015 22:35:33 +0000 (15:35 -0700)]
Add libgit2 to list of build deps in README

10 years agoAuto merge of #1778 - steveklabnik:fix_css, r=alexcrichton
bors [Fri, 3 Jul 2015 18:50:01 +0000 (18:50 +0000)]
Auto merge of #1778 - steveklabnik:fix_css, r=alexcrichton

https://twitter.com/steveklabnik/status/617031020429373440

10 years agoFix double scrollbar issue
Steve Klabnik [Fri, 3 Jul 2015 18:18:46 +0000 (14:18 -0400)]
Fix double scrollbar issue

https://twitter.com/steveklabnik/status/617031020429373440

10 years agoAuto merge of #1762 - Dineshs91:manifest, r=alexcrichton
bors [Fri, 3 Jul 2015 00:20:26 +0000 (00:20 +0000)]
Auto merge of #1762 - Dineshs91:manifest, r=alexcrichton

Fixes #1580. I am a bit skeptical with the use of unwrap( ) though. Suggestion's on how to replace that would be great.

r? @alexcrichton

10 years agoCheck for empty target names
dinesh [Thu, 2 Jul 2015 16:57:29 +0000 (22:27 +0530)]
Check for empty target names

10 years agoAdd tests for all targets without names
dinesh [Tue, 30 Jun 2015 19:44:46 +0000 (01:14 +0530)]
Add tests for all targets without names

10 years agoCreate a method called name on TomlTarget
dinesh [Tue, 30 Jun 2015 19:43:15 +0000 (01:13 +0530)]
Create a method called name on TomlTarget

10 years agoMake lib name optional
dinesh [Sun, 21 Jun 2015 10:34:42 +0000 (16:04 +0530)]
Make lib name optional

10 years agoAdd a Target to the build script deps key
Alex Crichton [Wed, 1 Jul 2015 17:37:21 +0000 (10:37 -0700)]
Add a Target to the build script deps key

Previously a Target was not considered to be in the key of the map to build
script dependencies, but this meant that information like whether it was a
dev-dependency was lost. As a result libraries would depend on the build scripts
of their dev-dependencies, causing an internal error when the build script
hadn't finished yet when the library was being built.

Closes #1751

10 years agoAuto merge of #1748 - pwoolcoc:feature/quiet-mode, r=alexcrichton
bors [Wed, 1 Jul 2015 17:18:25 +0000 (17:18 +0000)]
Auto merge of #1748 - pwoolcoc:feature/quiet-mode, r=alexcrichton

New version of #738, adds `-q` and `--quiet` to all `cargo` subcommands.

cc @sinistersnare (sorry it took me 1.5 months to circle back around to this)

10 years agoAuto merge of #1775 - alexcrichton:update-cargo-lock, r=alexcrichton
bors [Wed, 1 Jul 2015 16:59:23 +0000 (16:59 +0000)]
Auto merge of #1775 - alexcrichton:update-cargo-lock, r=alexcrichton

10 years agoUpdate Cargo.lock for updated version
Alex Crichton [Wed, 1 Jul 2015 16:57:57 +0000 (09:57 -0700)]
Update Cargo.lock for updated version

10 years agoCloses #653
Paul Woolcock [Tue, 21 Oct 2014 18:48:16 +0000 (14:48 -0400)]
Closes #653

Adds a `-q|--quiet` option to all cargo commands that suppresses output from
cargo. In the case of `cargo run`, output from the project executable will
still be shown.

10 years agoAuto merge of #1770 - alexcrichton:shell, r=alexcrichton
bors [Wed, 1 Jul 2015 00:41:14 +0000 (00:41 +0000)]
Auto merge of #1770 - alexcrichton:shell, r=alexcrichton

Tweaked version of https://github.com/rust-lang/cargo/pull/1673.

10 years agoTweak escaping on Windows shells
Alex Crichton [Tue, 30 Jun 2015 18:15:55 +0000 (11:15 -0700)]
Tweak escaping on Windows shells

Also detect if we're on Windows whether we're an MSYS or cmd.exe shell at
runtime

10 years agoAuto merge of #1760 - jdub:cc-to-gcc, r=alexcrichton
bors [Mon, 29 Jun 2015 17:24:44 +0000 (17:24 +0000)]
Auto merge of #1760 - jdub:cc-to-gcc, r=alexcrichton

10 years agoDon't conditionally compile escaping strategies
Alex Crichton [Mon, 29 Jun 2015 16:22:49 +0000 (09:22 -0700)]
Don't conditionally compile escaping strategies

Compile them both in and select at runtime.

10 years agoMerge branch 'shell-escape' of https://github.com/bluss/cargo into shell
Alex Crichton [Mon, 29 Jun 2015 16:19:56 +0000 (09:19 -0700)]
Merge branch 'shell-escape' of https://github.com/bluss/cargo into shell

10 years agoUse gcc crate in native build script example
Jeff Waugh [Mon, 29 Jun 2015 06:19:17 +0000 (16:19 +1000)]
Use gcc crate in native build script example

10 years agoAuto merge of #1761 - jdub:1684-target-examples, r=alexcrichton
bors [Mon, 29 Jun 2015 05:40:06 +0000 (05:40 +0000)]
Auto merge of #1761 - jdub:1684-target-examples, r=alexcrichton

Fixes rust-lang/cargo#1684

10 years agoAdd path and target file dependency examples
Jeff Waugh [Mon, 29 Jun 2015 01:16:59 +0000 (11:16 +1000)]
Add path and target file dependency examples

Fixes rust-lang/cargo#1684

10 years agoAuto merge of #1765 - gentoo90:bash-comp, r=alexcrichton
bors [Sun, 28 Jun 2015 19:56:26 +0000 (19:56 +0000)]
Auto merge of #1765 - gentoo90:bash-comp, r=alexcrichton

10 years agoBashcompletion for rustc, search and help commands
gentoo90 [Sun, 28 Jun 2015 10:00:11 +0000 (13:00 +0300)]
Bashcompletion for rustc, search and help commands

10 years agoAuto merge of #1753 - alexcrichton:bump, r=brson
bors [Sat, 27 Jun 2015 03:30:06 +0000 (03:30 +0000)]
Auto merge of #1753 - alexcrichton:bump, r=brson

r? @brson

10 years agoAuto merge of #1757 - alexcrichton:fix-msvc-build, r=huonw
bors [Fri, 26 Jun 2015 23:23:44 +0000 (23:23 +0000)]
Auto merge of #1757 - alexcrichton:fix-msvc-build, r=huonw

This commit updates Cargo's unit tests to pass `make check` entirely on MSVC
targets. Two tests are ignored on MSVC as it requires panicking to be
implemented, which currently isn't, but otherwise Cargo is fully functional.

10 years agoGet `make test` working on MSVC
Alex Crichton [Fri, 26 Jun 2015 22:51:53 +0000 (15:51 -0700)]
Get `make test` working on MSVC

This commit updates Cargo's unit tests to pass `make check` entirely on MSVC
targets. Two tests are ignored on MSVC as it requires panicking to be
implemented, which currently isn't, but otherwise Cargo is fully functional.

10 years agoAuto merge of #1755 - tshepang:email-got-envvar, r=alexcrichton
bors [Fri, 26 Jun 2015 23:00:05 +0000 (23:00 +0000)]
Auto merge of #1755 - tshepang:email-got-envvar, r=alexcrichton

10 years agoAuto merge of #1756 - tshepang:match-names-below, r=alexcrichton
bors [Fri, 26 Jun 2015 22:32:50 +0000 (22:32 +0000)]
Auto merge of #1756 - tshepang:match-names-below, r=alexcrichton

10 years agouse $EMAIL environment variable as fallback
Tshepang Lekhonkhobe [Fri, 26 Jun 2015 18:47:04 +0000 (20:47 +0200)]
use $EMAIL environment variable as fallback

10 years agotest: names used in .cargo/config are new-foo and new-bar, so match them
Tshepang Lekhonkhobe [Fri, 26 Jun 2015 22:07:22 +0000 (00:07 +0200)]
test: names used in .cargo/config are new-foo and new-bar, so match them

10 years agoAuto merge of #1754 - tshepang:patch-1, r=steveklabnik
bors [Fri, 26 Jun 2015 18:32:35 +0000 (18:32 +0000)]
Auto merge of #1754 - tshepang:patch-1, r=steveklabnik

10 years agothe sentence with poor grammar was not even needed
Tshepang Lekhonkhobe [Fri, 26 Jun 2015 17:30:15 +0000 (19:30 +0200)]
the sentence with poor grammar was not even needed

10 years agoBump version to 0.4.0
Alex Crichton [Fri, 26 Jun 2015 15:27:02 +0000 (08:27 -0700)]
Bump version to 0.4.0

10 years agoAuto merge of #1746 - alexcrichton:less-git-operations, r=huonw
bors [Thu, 25 Jun 2015 16:04:52 +0000 (16:04 +0000)]
Auto merge of #1746 - alexcrichton:less-git-operations, r=huonw

This enables libgit2 to not traverse the majority of the tree, saving a lot of
otherwise unnecessary syscalls.

For me this locally reduced the `cargo test` time of winapi-rs from 1.2s to 0.27s

10 years agoFilter statuses only by the relevant path
Alex Crichton [Thu, 25 Jun 2015 06:56:59 +0000 (23:56 -0700)]
Filter statuses only by the relevant path

This enables libgit2 to not traverse the majority of the tree, saving a lot of
otherwise unnecessary syscalls.

10 years agoAuto merge of #1742 - dhuseby:updating_installer_to_fix_bitrig, r=alexcrichton
bors [Wed, 24 Jun 2015 18:22:25 +0000 (18:22 +0000)]
Auto merge of #1742 - dhuseby:updating_installer_to_fix_bitrig, r=alexcrichton

this pulls in the recent installer fix for bitrig.

10 years agoupdating rust installer dependency to fix bitrig
Dave Huseby [Wed, 24 Jun 2015 11:04:04 +0000 (04:04 -0700)]
updating rust installer dependency to fix bitrig

10 years agoAuto merge of #1724 - alexcrichton:msvc, r=brson
bors [Wed, 24 Jun 2015 01:12:33 +0000 (01:12 +0000)]
Auto merge of #1724 - alexcrichton:msvc, r=brson

* Download all snapshots and such from static.rust-lang.org (drive-by fix)
* Update dependencies to work and build on MSVC
  * ssh2-sys uses `nmake` to build libssh2
  * libgit2-sys uses `cmake` to build libgit2
  * curl-sys uses `nmake` to build libcurl
  * libz-sys uses `nmake` to build zlib
  * miniz-sys uses `gcc-rs` to drive `cl.exe` manually
  * term updated to pick up windows-specific deps on MSVC
* Updated .travis.install.deps.sh to install MSVC target libraries on Windows,
  so the compiler can be used to target MSVC. A 64-bit target is now used by
  default as well.
* Updated the configure script and Makefile to set appropriate environment
  variables to build Cargo from a MSYS shell with a MSVC target. This is similar
  to how Rust bootstraps on MSVC as well.

With this commit Cargo can successfully bootstrap itself on MSVC (use the MSVC
product to build itself again). The tests currently do not pass because
unwinding is not implemented, but soon!

Closes #1725

10 years agoFix build on MSVC
Alex Crichton [Mon, 15 Jun 2015 05:13:08 +0000 (22:13 -0700)]
Fix build on MSVC

* Download all snapshots and such from static.rust-lang.org (drive-by fix)
* Update dependencies to work and build on MSVC
  * ssh2-sys uses `nmake` to build libssh2
  * libgit2-sys uses `cmake` to build libgit2
  * curl-sys uses `nmake` to build libcurl
  * libz-sys uses `nmake` to build zlib
  * miniz-sys uses `gcc-rs` to drive `cl.exe` manually
  * term updated to pick up windows-specific deps on MSVC
* Updated .travis.install.deps.sh to install MSVC target libraries on Windows,
  so the compiler can be used to target MSVC. A 64-bit target is now used by
  default as well.
* Updated the configure script and Makefile to set appropriate environment
  variables to build Cargo from a MSYS shell with a MSVC target. This is similar
  to how Rust bootstraps on MSVC as well.

With this commit Cargo can successfully bootstrap itself on MSVC (use the MSVC
product to build itself again). The tests currently do not pass because
unwinding is not implemented, but soon!

10 years agoAuto merge of #1740 - alexcrichton:update-toml, r=alexcrichton
bors [Wed, 24 Jun 2015 00:48:04 +0000 (00:48 +0000)]
Auto merge of #1740 - alexcrichton:update-toml, r=alexcrichton

Closes #1739

10 years agoBump toml to improve errors on enums
Alex Crichton [Wed, 24 Jun 2015 00:46:26 +0000 (17:46 -0700)]
Bump toml to improve errors on enums

Closes #1739

10 years agoAuto merge of #1735 - Byron:term-0.2.9-compatibility, r=alexcrichton
bors [Sun, 21 Jun 2015 18:34:06 +0000 (18:34 +0000)]
Auto merge of #1735 - Byron:term-0.2.9-compatibility, r=alexcrichton

When attempting to compile cargo with the latest `term` crate,
one would face compilation issues due to an attempt to declare
a `Terminal` type without its apparently new associated type
called `Output`.

The fix involves the removal of the `UghWHyIsThisNecessary` type,
and declares the `Terminal` type as
`Terminal<Output=Box<Write + Send>>`.

**Note:** The reason I ran into this was an accidental update to the `Cargo.lock` file, which pulled in the said version of `term`.

10 years agoAuto merge of #1737 - Byron:doc-fix, r=alexcrichton
bors [Sun, 21 Jun 2015 18:20:50 +0000 (18:20 +0000)]
Auto merge of #1737 - Byron:doc-fix, r=alexcrichton

As stated [in code](https://goo.gl/8xMl4a), benchmarks are to be found
in the 'benches' directory, not in the 'examples' directory.

10 years agoAdded EOF to shell.rs
Sebastian Thiel [Sun, 21 Jun 2015 12:13:07 +0000 (14:13 +0200)]
Added EOF to shell.rs

10 years agoCorrection of benchmarks directory
Sebastian Thiel [Sun, 21 Jun 2015 07:57:49 +0000 (09:57 +0200)]
Correction of benchmarks directory

As stated [in code](https://goo.gl/8xMl4a), benchmarks are to be found
in the 'benches' directory, not in the 'examples' directory.

10 years agoCompatibility with `term` *0.2.9*
Sebastian Thiel [Sat, 20 Jun 2015 13:56:03 +0000 (15:56 +0200)]
Compatibility with `term` *0.2.9*

When attempting to compile cargo with the latest `term` crate,
one would face compilation issues due to an attempt to declare
a `Terminal` type without its apparently new associated type
called `Output`.

The fix involves the removal of the `UghWHyIsThisNecessary` type,
and declares the `Terminal` type as
`Terminal<Output=Box<Write + Send>>`.

10 years agoAuto merge of #1733 - wackywendell:project-layout, r=steveklabnik
bors [Fri, 19 Jun 2015 16:38:59 +0000 (16:38 +0000)]
Auto merge of #1733 - wackywendell:project-layout, r=steveklabnik

I have several times found myself trying to remember where to put examples, and getting frustrated looking for it in the guide - because its not there, its in the manifest description, which I find to be a non-intuitive place for it. I thought it might help to unify the project layout sections between "The Guide" and "Manifest Description", and have them both link to each other for explanations where needed.

Of course, I am very willing to take any suggestions on my changes; I'm not wedded to any of text in specific, I just want the two sections to not be so separate and hard to find, especially from each other.

10 years agoReturn guide and manifest to original format, but with additional info
Wendell Smith [Fri, 19 Jun 2015 13:15:37 +0000 (09:15 -0400)]
Return guide and manifest to original format, but with additional info

This puts the main "Project Layout" section back into `manifest.md` as it was
before, but adds a bit more detail to that section both those pages and a link
between them.

10 years agoMoved and expanded project layout
Wendell Smith [Thu, 18 Jun 2015 15:57:35 +0000 (11:57 -0400)]
Moved and expanded project layout

10 years agoAuto merge of #1730 - alexcrichton:update-docopt, r=alexcrichton
bors [Wed, 17 Jun 2015 22:56:29 +0000 (22:56 +0000)]
Auto merge of #1730 - alexcrichton:update-docopt, r=alexcrichton

Closes #1720

10 years agoUpdate docopt to fix some option parsing
Alex Crichton [Wed, 17 Jun 2015 22:55:16 +0000 (15:55 -0700)]
Update docopt to fix some option parsing

Closes #1720

10 years agoAuto merge of #1712 - alexcrichton:run-cargo-on-stable, r=brson
bors [Wed, 17 Jun 2015 05:32:17 +0000 (05:32 +0000)]
Auto merge of #1712 - alexcrichton:run-cargo-on-stable, r=brson

This commit moves Cargo onto 100% stable Rust now that the necessary fs features
have been stabilized. The tests were updated to understand when they're running
with a non-nightly compiler and disable all plugin-related tests. The only major
feature here is that the calls to `fs::set_file_times` were reimplemented
manually in the tests that Cargo has.

Cargo still requires a *nightly compiler* due to the stable features not having
made their way into the stable channel yet, but it will soon work on all of the
stable, beta, and nightly compilers once 1.1 is released!

10 years agoMove Cargo onto stable Rust
Alex Crichton [Sat, 13 Jun 2015 00:37:19 +0000 (17:37 -0700)]
Move Cargo onto stable Rust

This commit moves Cargo onto 100% stable Rust now that the necessary fs features
have been stabilized. The tests were updated to understand when they're running
with a non-nightly compiler and disable all plugin-related tests. The only major
feature here is that the calls to `fs::set_file_times` were reimplemented
manually in the tests that Cargo has.

Cargo still requires a *nightly compiler* due to the stable features not having
made their way into the stable channel yet, but it will soon work on all of the
stable, beta, and nightly compilers once 1.1 is released!

10 years agoAuto merge of #1715 - iliekturtles:nightly-stable, r=wycats
bors [Mon, 15 Jun 2015 00:10:05 +0000 (00:10 +0000)]
Auto merge of #1715 - iliekturtles:nightly-stable, r=wycats

Change references to the current stable Rust. Also correct Windows
install links to point to the new .msi installers.

I totally removed the nightly paragraph from the FAQ as I couldn't think of anything to replace it with.

10 years agoRemove references to prefering nightly Rust.
Mike Boutin [Mon, 15 Jun 2015 00:04:44 +0000 (20:04 -0400)]
Remove references to prefering nightly Rust.

Change references to the current stable Rust. Also correct Windows
install links to point to the new .msi installers.

10 years agoAuto merge of #1714 - alexcrichton:default-feature-oscillating, r=huonw
bors [Sun, 14 Jun 2015 20:24:01 +0000 (20:24 +0000)]
Auto merge of #1714 - alexcrichton:default-feature-oscillating, r=huonw

There was previously a bug in resolve where turning off the default set of
features would cause resolve to not correctly settle on the set of features
activated for a package. If one dependency turned off all features, and then the
next dependency to be activated only turned on the default feature, the default
feature wouldn't actually end up getting activated.

This commit alters the check to see if the package has been previously activated
to more rigorously check to see if the 'default' feature is activated
previously. If a dependency doesn't use the default feature, or if the package
itself does not have the feature "default", then the package is considered
activated, but otherwise it needs to go through another cycle of resolution.

10 years agoFix resolution with `default-features = false`
Alex Crichton [Sun, 14 Jun 2015 18:16:46 +0000 (11:16 -0700)]
Fix resolution with `default-features = false`

There was previously a bug in resolve where turning off the default set of
features would cause resolve to not correctly settle on the set of features
activated for a package. If one dependency turned off all features, and then the
next dependency to be activated only turned on the default feature, the default
feature wouldn't actually end up getting activated.

This commit alters the check to see if the package has been previously activated
to more rigorously check to see if the 'default' feature is activated
previously. If a dependency doesn't use the default feature, or if the package
itself does not have the feature "default", then the package is considered
activated, but otherwise it needs to go through another cycle of resolution.

10 years agoAuto merge of #1713 - eerden:zsh-autocompletion-testnames-fix, r=alexcrichton
bors [Sun, 14 Jun 2015 04:18:48 +0000 (04:18 +0000)]
Auto merge of #1713 - eerden:zsh-autocompletion-testnames-fix, r=alexcrichton

Fixes #1703

10 years agoDisable package completion
Ercan Erden [Sat, 13 Jun 2015 23:02:17 +0000 (19:02 -0400)]
Disable package completion

10 years agoFix bench name completion
Ercan Erden [Sat, 13 Jun 2015 22:54:34 +0000 (18:54 -0400)]
Fix bench name completion

10 years agoImprove autocompletion of test items
Ercan Erden [Sat, 13 Jun 2015 20:34:14 +0000 (16:34 -0400)]
Improve autocompletion of test items

Test item autocompletion didn't work because it required the name of the
test to come immediately after [[test]] line. This commit should fix
that.

10 years agoFix wrong auto completion for update --precise
Ercan Erden [Sat, 13 Jun 2015 20:36:34 +0000 (16:36 -0400)]
Fix wrong auto completion for update --precise

--precise argument for the update command was fed test names. This
commit prevents autocompletion of --precise.

10 years agoFix error causing test name completion failure
Ercan Erden [Sat, 13 Jun 2015 19:51:49 +0000 (15:51 -0400)]
Fix error causing test name completion failure

This was caused by a syntax error.

10 years agoAuto merge of #1709 - alexcrichton:fix-some-overrides, r=brson
bors [Fri, 12 Jun 2015 22:12:14 +0000 (22:12 +0000)]
Auto merge of #1709 - alexcrichton:fix-some-overrides, r=brson

The fix in #1697 was to alter the `Hash` implementation of `Package` to take
into account the source root instead of just the package id (so packages at the
same source would have the same hash). There's a spot, however, where we
normalize some paths and not others, causing two paths which logically point the
same location end up having different hashes, so the same package ended up being
stored multiple times, later leading to an assertion that there was only one
stored.

This commit alters the behavior of read_packages to keep a hash map of ID =>
Package instead of just a hash set of Package as the deduplication/equality
needs to be based on the ID, not the literal path to the source root.

This specific bug shows up when you have an override and a normal dependency
pointing at the same location (and the override has some inter-dependencies).
Not exactly a normal use case, but it showed up in Servo's build!

10 years agoDon't rely on Hash for Package deduplicating
Alex Crichton [Fri, 12 Jun 2015 22:03:15 +0000 (15:03 -0700)]
Don't rely on Hash for Package deduplicating

The fix in #1697 was to alter the `Hash` implementation of `Package` to take
into account the source root instead of just the package id (so packages at the
same source would have the same hash). There's a spot, however, where we
normalize some paths and not others, causing two paths which logically point the
same location end up having different hashes, so the same package ended up being
stored multiple times, later leading to an assertion that there was only one
stored.

This commit alters the behavior of read_packages to keep a hash map of ID =>
Package instead of just a hash set of Package as the deduplication/equality
needs to be based on the ID, not the literal path to the source root.

This specific bug shows up when you have an override and a normal dependency
pointing at the same location (and the override has some inter-dependencies).
Not exactly a normal use case, but it showed up in Servo's build!

10 years agoAuto merge of #1701 - alexcrichton:lenient-rustc-flags, r=brson
bors [Fri, 12 Jun 2015 18:36:01 +0000 (18:36 +0000)]
Auto merge of #1701 - alexcrichton:lenient-rustc-flags, r=brson

Some flags to the compiler could cause it to stop early or not emit some files
altogether (or perhaps emit files in different locations even). Currently cargo
expects a few outputs of the compiler after `cargo rustc` is run, but this
commit alters cargo to know that when `cargo rustc` is being run that the
outputs may not exist and that's ok.

Closes #1675

10 years agoAuto merge of #1705 - alexcrichton:fix-test-non-root-package, r=brson
bors [Fri, 12 Jun 2015 00:18:15 +0000 (00:18 +0000)]
Auto merge of #1705 - alexcrichton:fix-test-non-root-package, r=brson

The previous overhaul of how dependencies among build dependencies were
traversed ended up picking the wrong root package when the `-p` argument was
specified to commands. This commit fixes this up by making sure the right root
package is passed along.

10 years agoAuto merge of #1704 - JustAPerson:doc_codegen_units, r=alexcrichton
bors [Thu, 11 Jun 2015 16:41:56 +0000 (16:41 +0000)]
Auto merge of #1704 - JustAPerson:doc_codegen_units, r=alexcrichton

Closes #1691

10 years agoFix testing the non-root package
Alex Crichton [Thu, 11 Jun 2015 07:24:05 +0000 (00:24 -0700)]
Fix testing the non-root package

The previous overhaul of how dependencies among build dependencies were
traversed ended up picking the wrong root package when the `-p` argument was
specified to commands. This commit fixes this up by making sure the right root
package is passed along.

10 years agoDocument the `codegen-units` manifest option
Jason Priest [Thu, 11 Jun 2015 01:53:34 +0000 (20:53 -0500)]
Document the `codegen-units` manifest option

Closes #1691

10 years agoAuto merge of #1702 - alexcrichton:fix-traverse-build-deps, r=brson
bors [Wed, 10 Jun 2015 17:28:45 +0000 (17:28 +0000)]
Auto merge of #1702 - alexcrichton:fix-traverse-build-deps, r=brson

It looks like the recent restructuring into an O(N) pass had a regression
(reported in #1695) where deps-of-deps didn't have their build script arguments
propagated upwards. This fixes the caching logic to take into account the
profile as part of the key to ensure that we traverse targets twice if
necessary.

Closes #1695

10 years agoFix propagation of build script args
Alex Crichton [Wed, 10 Jun 2015 02:31:47 +0000 (19:31 -0700)]
Fix propagation of build script args

It looks like the recent restructuring into an O(N) pass had a regression
(reported in #1695) where deps-of-deps didn't have their build script arguments
propagated upwards. This fixes the caching logic to take into account the
profile as part of the key to ensure that we traverse targets twice if
necessary.

Closes #1695

10 years agoHandle missing files after `cargo rustc`
Alex Crichton [Wed, 10 Jun 2015 01:40:50 +0000 (18:40 -0700)]
Handle missing files after `cargo rustc`

Some flags to the compiler could cause it to stop early or not emit some files
altogether (or perhaps emit files in different locations even). Currently cargo
expects a few outputs of the compiler after `cargo rustc` is run, but this
commit alters cargo to know that when `cargo rustc` is being run that the
outputs may not exist and that's ok.

Closes #1675

10 years agoAuto merge of #1697 - alexcrichton:fix-path-pkgid, r=brson
bors [Mon, 8 Jun 2015 22:31:51 +0000 (22:31 +0000)]
Auto merge of #1697 - alexcrichton:fix-path-pkgid, r=brson

The method of creating package ids in Cargo means that all sub-crates of a main
repo have the same package id, which encodes the path it came from. This means
that if the "root crate" switches, the package id for all dependencies will
change, causing an alteration in package id hashes, causing recompiles.

This commit alters a few points of hashing to ensure that whenever a package is
being hashed for freshness the *source root* of the crate is used instead of the
root of the main crate. This cause the hashes to be consistent across compiles,
regardless of the root package.

Closes #1694

10 years agoFix spurious rebuilds when switching source paths
Alex Crichton [Mon, 8 Jun 2015 22:18:38 +0000 (15:18 -0700)]
Fix spurious rebuilds when switching source paths

The method of creating package ids in Cargo means that all sub-crates of a main
repo have the same package id, which encodes the path it came from. This means
that if the "root crate" switches, the package id for all dependencies will
change, causing an alteration in package id hashes, causing recompiles.

This commit alters a few points of hashing to ensure that whenever a package is
being hashed for freshness the *source root* of the crate is used instead of the
root of the main crate. This cause the hashes to be consistent across compiles,
regardless of the root package.

Closes #1694

10 years agoAuto merge of #1693 - durka:patch-1, r=steveklabnik
bors [Mon, 8 Jun 2015 18:56:11 +0000 (18:56 +0000)]
Auto merge of #1693 - durka:patch-1, r=steveklabnik

I was confused by the double-asterisk syntax in the glob. I figured it couldn't hurt to unobtrusively document what the format is.

10 years agodoc: add link to glob::glob::Pattern
Alex Burka [Mon, 8 Jun 2015 18:48:33 +0000 (14:48 -0400)]
doc: add link to glob::glob::Pattern

I was confused by the double-asterisk syntax in the glob. I figured it couldn't hurt to unobtrusively document what the format is.

10 years agoClone less with an extra `Registry` impl
Alex Crichton [Mon, 8 Jun 2015 17:58:15 +0000 (10:58 -0700)]
Clone less with an extra `Registry` impl

10 years agoRemove redundant storage of source id in Package
Alex Crichton [Mon, 8 Jun 2015 17:51:29 +0000 (10:51 -0700)]
Remove redundant storage of source id in Package

The package already has access to the source through the stored manifest's
package ID.

10 years agoAuto merge of #1682 - yoongkang:new_error_msg, r=alexcrichton
bors [Sun, 7 Jun 2015 17:19:35 +0000 (17:19 +0000)]
Auto merge of #1682 - yoongkang:new_error_msg, r=alexcrichton

Some project names caused problems as
they already exist in target/debug. When
the projects fail to be created, the error
message was also not descriptive.

This commit adds a blacklist and a more
descriptive error message.

See #1618.

10 years agoAuto merge of #1687 - huonw:dev-dep-doc-test, r=alexcrichton
bors [Sat, 6 Jun 2015 17:45:12 +0000 (17:45 +0000)]
Auto merge of #1687 - huonw:dev-dep-doc-test, r=alexcrichton

Previously a dependency cycle like `a` <-(normal)- `b` <-(dev)- `a`
would mean that importing `b` in `a`'s doc test would fail because the
original `a` library was not found.

Fixes #1686.

10 years agotest: point doc tests to the main library, for cyclic deps.
Huon Wilson [Sat, 6 Jun 2015 08:22:36 +0000 (18:22 +1000)]
test: point doc tests to the main library, for cyclic deps.

Previously a dependency cycle like `a` <-(normal)- `b` <-(dev)- `a`
would mean that importing `b` in `a`'s doc test would fail because the
original `a` library was not found.

Fixes #1686.

10 years agoBlacklist binary target names
Yoong Kang Lim [Wed, 3 Jun 2015 13:35:44 +0000 (23:35 +1000)]
Blacklist binary target names

Some binary targets caused problems as
the directory names exist in target/debug. When
the compilation step fails, the error
message was also not descriptive.

This commit adds a blacklist and a more
descriptive error message.

See #1618.

10 years agoAuto merge of #1657 - alexcrichton:share-target-dirs, r=brson
bors [Thu, 4 Jun 2015 17:30:58 +0000 (17:30 +0000)]
Auto merge of #1657 - alexcrichton:share-target-dirs, r=brson

This commit adds support to allow specifying a custom output directory to Cargo.
First, the `build.target-dir` configuration key is checked, and failing that the
`CARGO_TARGET_DIR` environment variable is checked, and failing that the root
package's directory joined with the directory name "target" is used.

There are a few caveats to switching target directories, however:

* If the target directory is in the current source tree, and the folder name is
  not called "target", then Cargo may walk the output directory when determining
  whether a tree is fresh.
* If the target directory is not called "target", then Cargo may look inside it
  currently for `Cargo.toml` files to learn about local packages.
* Concurrent usage of Cargo will still result in badness (#354), and this is now
  exascerbated because many Cargo projects can share the same output directory.
* The top-level crate is not cached for future compilations, so if a crate is
  built into directory `foo` and then that crate is later used as a dependency,
  it will be recompiled.

The naming limitations can be overcome in time, but for now it greatly
simplifies the crawling routines and shouldn't have much of a negative impact
other than some Cargo runtimes (which can in turn be negated by following the
"target" name convention).

Closes #482